//
//  DownLoadHelper.h
//  MISCloud
//
//  Created by goldeney on 13-9-18.
//  Copyright (c) 2013年 goldeneye. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "DownloadDelegate.h"
#import "FileAttributeModel.h"
#import "ASIHTTPRequest.h"
#import "FilePathHelper.h"
#import "FileSizeFormatHelper.h"
#import "FilePathHelper.h"

@interface DownLoadHelper : NSObject <ASIHTTPRequestDelegate,ASIProgressDelegate>

@property(nonatomic,weak)id<DownloadDelegate> downloadDelegate;
@property(nonatomic,strong)NSMutableArray *finishedlist;//已下载完成的文件列表（文件对象）
@property(nonatomic,strong)NSMutableArray *downinglist;//正在下载的文件列表(ASIHttpRequest对象)
@property(nonatomic,strong)ASIHTTPRequest *request;

+ (instancetype)sharedInstance;

- (id)initWithData;
- (void)loadTempfiles;//将本地的未下载完成的临时文件加载到正在下载列表里,但是不接着开始下载
- (void)loadFinishedfiles;//将本地已经下载完成的文件加载到已下载列表里

//1.进行一次新的队列请求
//2.是否接着开始下载
- (void)beginRequest:(FileAttributeModel*)fileInfo isBeginDown:(BOOL)isBeginDown;

@end
